import { renderRoutes } from "@/App";
import { useRoute } from "@/hooks/useRoute";
import NotFound from "@/layout/NotFound/NotFound";
import { Route, Routes } from "react-router";

const Router = () => {
    const { routes } = useRoute();
    return (
        <Routes>
            {renderRoutes(routes)}
            <Route path="*" element={<NotFound />} />
        </Routes>
    );
};

export default Router;
